package com.geniusk;

import com.geniusk.chat.ChatServer;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * mqtt broker的启动
 */

@Component
public class ChatServerStartListener implements ApplicationRunner {


    @Resource
    ChatServer chatServer;

    @Override
    public void run(ApplicationArguments args) {
        chatServer.start();
    }
}
